<?php
/**
 * Contains customisations for the achievements post type screens.
 *
 * @author Paul Gibbs <paul@byotos.com>
 * @package Achievements
 * @subpackage admin
 *
 * $Id$
 */

/**
 * Enqueue CSS for post type admin screens.
 *
 * @since 2.1
 */
function dpa_admin_enqueue_css() {
	wp_enqueue_style( 'achievements-admin', plugins_url( '/admin.css', __FILE__ ), array(), ACHIEVEMENTS_VERSION );
}
add_action( 'dpa_admin_load_admin_menu_achievements', 'dpa_admin_enqueue_css' );

/**
 * "Achievement Settings" meta box
 *
 * @since 2.1
 */
function dpa_admin_achievements_mb() {
?>
	<h4 class="heading">Type</h4>
	<p class="hint"><?php _e( 'An <em>award</em> is given by a site admin, whereas an <em>event</em> is unlocked automatically when its criteria are met.', 'dpa' ); ?></p>
	<fieldset class="achievement-type">
		<label><input type="radio" name="dpa_achievements_type" value="award" />&nbsp;<?php _e( 'Award', 'dpa' ); ?></label>
		<label><input type="radio" name="dpa_achievements_type" value="event" />&nbsp;<?php _e( 'Event', 'dpa' ); ?></label>
	</fieldset>
	<div style="clear: both"></div>

	<h4 class="heading">Reward</h4>
	<p class="hint"><label for="achievement-points"><?php _e( 'Points are awarded when achievements are unlocked. They can be used as a measurement of contribution.', 'dpa' ); ?></label></p>
	<fieldset class="achievement-rewards">
		<input type="number" value="0" name="achievement-points" id="achievement-points" />
	</fieldset>
	<div style="clear: both"></div>

	<h4 class="heading">Advanced</h4>
	<p class="hint"><label for="achievement-hidden"><?php _e( 'Hide achievement from lists and searches.', 'dpa' ); ?></label></p>
	<fieldset class="achievement-settings">
		<input type="checkbox" name="achievement-hidden" id="achievement-hidden">
	</fieldset>
	<div style="clear: both"></div>
<?php
}

/**
 * "Achievement Events" meta box
 *
 * @since 1.0
 */
function dpa_achievements_event_mb() {
?>
	<div class="wrapper">
		<ul class="categories">
			<li>cat</li>
			<li>cat</li>
			<li>cat</li>
			<li>cat</li>
			<li>cat</li>
			<li>cat</li>
			<li>cat</li>
		</ul>

		<ul class="events">
			<li>event</li>
			<li>event</li>
			<li>event</li>
		</ul>

		<div style="clear: both"></div>
	</div>
<?php
}
?>